import Https from "@/utils/Https2";

// 获取字典类型分页表
export const queryTableDataListReq = (params: any) =>
  Https.post("/system/dict/type/dictTypeList", params, true);

// 新增字典类型
export const addDictionaryTypeReq = (data: {}) =>
  Https.post("/system/dict/type/addDict", data, true);

// 删除字典类型
export const delDictionaryTypeReq = (id: number | string) =>
  Https.delete(`/system/dict/type/dictIds/${id}`, {}, true);

// 查询详细字典类型信息
export const queryTableDataInfoReq = (id: number | string) =>
  Https.get(`/system/dict/type/${id}`, {}, true);

// 修改字典类型
export const updateDictionaryTypeReq = (data: {}) =>
  Https.put(`/system/dict/type/updateDict`, data, true);

// 刷新字典缓存
export const refreshListReq = () =>
  Https.delete(`/system/dict/type/dict/refreshCache`, {}, true);
